﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Stones.ascx.cs" Inherits="UserControls_Stones" %>
<div>
    <asp:Button ID="btnAddRows" runat="server" Text="Add New Row" OnClick="btnAddRows_Click" />
    <div id="divgvStones">
        <asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="false" ShowFooter="true" Width="100%">
            <Columns>
                <asp:BoundField DataField="RowNumber" HeaderText="S.No" />
                <asp:TemplateField HeaderText="Stone Name">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlStoneNames" runat="server" DataTextField="STONENAME" DataValueField="STONECODE"
                            DataSource='<%#  GetMstStones() %>'>
                        </asp:DropDownList>
                    </ItemTemplate>
                    <FooterTemplate>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Pices Count" FooterText="Totals">
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:Label ID="lbl" runat="server"></asp:Label>
                    </FooterTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Unit Cost">
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Weight">
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Units">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlUnits" runat="server" DataTextField="UNITNAME" DataValueField="UNITCODE"
                            DataSource='<%#  GetUnits() %>'>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Net Price">
                    <ItemTemplate>
                        <asp:TextBox ID="TextBox7" runat="server" CssClass="totalPrice"></asp:TextBox>
                    </ItemTemplate>
                    <FooterTemplate>
                        Total: <span class="grandtotal"></span>
                    </FooterTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</div>
